package com.kate.map.mapper;

import com.kate.map.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    /**
     * 根据id查询用户信息
     * @param uid
     * @return
     */
    User findById(Integer uid);

    User findByCondition(@Param("uid1") Integer uid1,@Param("uid2") Integer uid2);

    /**
     * 测试if动态sql标签
     * @return
     */
    List<User> findUserByConditionIf(User user);
    /**
     * 测试choose动态sql标签
     * @return
     */
    List<User> findUserByConditionChoose(User user);

    //3.set
    int updateUserByConditionSet(User user);

    //4.trim
    List<User> findUserByConditionTrim(User user);

    //5.foreach
    //根据多个id值查询多个用户的信息
    List<User> findUserByConditionForeach(Integer[] ids);
}
